<template>
  <CaseManage />
</template>

<script>
import CaseManage from "@/components/CaseManage";

export default {
  name: "CaseInfo",
  components: {
    CaseManage
  },
  created() {
    const info = JSON.parse(localStorage.getItem("user"));
    const permissions = info.permissions.filter(item => Number(item.menuId) === 13).map(item => item.path);
    let permissionIsShow = {
      caseAdd: permissions.includes('case-add'),
      caseEdit: permissions.includes('case-edit'),
      caseDelete: permissions.includes('case-delete'),
      casePass: permissions.includes('case-pass'),
      documentAdd : permissions.includes('case-document-add'),
      documentEdit : permissions.includes('case-document-edit'),
      documentDelete : permissions.includes('case-document-delete'),
    }
    sessionStorage.setItem('caseLog', JSON.stringify({
      id: '0',   // process
      name: 'CaseInfo',  // 页面名称
      menu: '部门内审',  // 页面大标题
      title: '案件录入',  // 页面标题
      templateStatus: ['1'], //当前页未通过文书的状态码(这里不用点击通过按钮,设置为"1"方便代码结构)
      passTemplateStatus: '1', //通过文书应该修改的状态码
      submitRole: [5], // 提交方向对应提交哪些审核角色
      submitTitle: ['提交至中队长'], // 提交方向数组
      submitProcess: ['1'], // 提交方向对应的状态码数组
      permissionIsShow: permissionIsShow,
    }));
  },
}
</script>
<style scoped>
:deep(.templateTableStyle) {
  height: calc(50vh - 156px);
}
</style>
